package com.yitiao.designmodel.behave.chain;

public class MainTest {
    public static void main(String[] args) {
        // client
        Course course = new Course();
        course.setVideo("video");
        course.setName("name");

        // 编排处理器链
        ArticleApprove articleApprove = new ArticleApprove();
        VideoApprove videoApprove = new VideoApprove();
        NameApprove nameApprove = new NameApprove();
        nameApprove.setNextApprove(articleApprove);
        articleApprove.setNextApprove(videoApprove);

        // 真正处理
        nameApprove.deploy(course);


    }
}
